Unification with Expansion Variables: Preliminary Results and Problems

نویسندگان

  • Adam Bakewell
  • Assaf J. Kfoury
چکیده

Expansion generalises substitution. An expansion is a special term whose leaves can be substitutions. Substitutions map term variables to ordinary terms and expansion variables to expansions. Expansions (resp., ordinary terms) may contain expansion variables, each applied to an argument expansion (resp., ordinary term). Instances of the unification problem in this setting are constraint sets, where constraints are pairs of ordinary terms, and unifiers are expansions. This problem offers many interesting challenges. The theory of unification with expansion variables was first considered in relation to the study of systems of intersection types for the λ-calculus. Solving constraint sets, under appropriate conditions, corresponds to type inference for lambda-terms in these systems. We explain expansions and present a simple rewrite system for unification with expansion variables where ordinary terms uses the intersection type constructors. The simple rewrite system lacks some important properties. We indicate how it can be adapted to: simulate β-reduction, and intersection typing, of λ-terms; be a complete semi-decision procedure for unification; be confluent; produce most-general unifiers. Every constraint set has a trivial unifier. However, finding a single most-general unifier is often impossible. We study the concept of mostgeneral unifiers and introduce principal unifiers, which are easier to construct. Most-general unifiers exist for the unification problem formed by a certain restriction of substitutions, and we give an incomplete variant of simple unification to that finds them. A second variant system addresses completeness and principality, producing covering substitution-unifier sets for constraints (every substitutionunifier is an instance of a set member, and all expansion-unifiers can be obtained from the set). For covering unifier sets we modify the problem to a form of E-unification where the constant ω is the unit of the intersection constructor. 1 Background and Motivation The study of unification with expansion variables has both practical and theoretical ramifications. The motivation comes from type systems for the λ-calculus ? Work partly funded by NSF grant CCR-0113193 Implementing Modular Program Analysis via Intersection and Union Types. and functional programming languages. The theoretical framework gives rise to a host of problems whose solutions require appropriately adapted algebraic and combinatorial techniques. The key novelty in our framework is the concept of an expansion variable. We start right off with a brief tutorial on expansion concepts in Section 1.1. The connection with type systems is briefly discussed in Section 1.2. The scope and organization of the paper are presented in Sections 1.3 and 1.4. 1.1 Expansion concepts An expansion generalizes the notion of substitution. It is a term whose leaves can be substitutions. For example, an expansion called E1 may be defined by E1 = ({a1 7→ a1 ⊗ a1} ⊗ a2)⊗ {a1 7→ a3} where ⊗ is a binary term constructor and each ai is a term variable (T-variable). Replacing each substitution leaf in E1 by the identity substitution, we obtain the term part of E1, namely ({}⊗a2)⊗{}. Applying the expansion E1 to a T-variable, say a1, written [E1] a1, results in the term part of E1 with each substitution leaf S replaced by S(a1). Thus, [E1] a1 = ((a1 ⊗ a1)⊗ a2)⊗ a3. Applying the expansion E1 to a plain term τ1 (without expansion variables) results in the term part of E1 with each substitution leaf S replaced by S(τ1). For example, if τ1 = (a1 ⊗ a1), then [E1] τ1 = [E1] (a1 ⊗ a1) = (((a1 ⊗ a1)⊗ (a1 ⊗ a1))⊗ a2)⊗ (a3 ⊗ a3). An expansion variable (E-variable) e, then, is a kind of function variable. Occurrences in terms are always applied to one argument. We say that E-variable e wraps its argument; the namespace of a subterm is the sequence of E-variables encountered on the path to it from the root of the term; and e occurs outermost if its namespace is empty. For example, in τ2 = e1 (a1 ⊗ e2 a1), E-variable e1 occurs outermost; e2 is in the namespace e1 and T-variable a1 has occurrences in the namespaces e1 and e1 · e2. Substitutions are extended to map E-variables to expansions as well as T-variables to terms. Substitution application is defined such that only the outermost variables of the argument are affected. For a more involved example, consider the following expansion E2: E2 = ({} ⊗ S1)⊗ S2 where S1 = {a1 7→ a4, e2 7→ E1}, S2 = {a1 7→ a5, e2 7→ e3 {a1 7→ a6}} 1 The notation {a1 7→ a1 ⊗ a1} defines the support of a total function f ; i.e. f(x) = x for all x except a1 where f(a1) = a1 ⊗ a1. The identity substitution is therefore the function whose support is {}, the empty set.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Study on the Attitude of Students of I.A.U of Religion 11 on National Unity and Islamic Unification

Because of its structure and cultural, social and historical conditions, the country of Iran has various ethnic, religious, and racial types. On the other hand, as  an element of large Islamic nation, Iran encounters various complex cultural conditions. The nature and the origin of unity and unification are the common points between these organs at both national and Islamic nation's level. In f...

متن کامل

On the Parameterized Complexity of Associative and Commutative Unification

This paper studies the unification problem with associative, commutative, and associative-commutative functions mainly from a viewpoint of the parameterized complexity on the number of variables. It is shown that both associative and associative-commutative unification problems are W [1]-hard. A fixed-parameter algorithm and a polynomialtime algorithm are presented for special cases of commutat...

متن کامل

The Effect of Unification of Exchange Rate on Macroeconomic Variables in Iran Using the Computable General Equilibrium Model (CGE)

There are several reasons for using the unification of exchange rate policy, which is usually associated with the devaluation.The extent of these policies' influences on the economy is very extensive, especially when the economy is relying on single-product exports and has high foreign-exchange reserves. These policies affect the demand side of the economy through the exports and imports channe...

متن کامل

DAMAGE IDENTIFICATION BY USING MODAL EXPANSION AND TOPOLOGY OPTIMIZATION IN THREE DIMENSIONAL ELASTICITY PROBLEMS

In this paper, topology optimization is utilized for damage detection in three dimensional elasticity problems. In addition, two mode expansion techniques are used to derive unknown modal data from measured data identified by installed sensors. Damages in the model are assumed as reduction of mass and stiffness in the discretized finite elements. The Solid Isotropic Material with Penalization (...

متن کامل

Linear Second-Order Unification

We present a new class of second-order unification problems, which we have called linear. We deal with completely general second-order typed unification problems, but we restrict the set of unifiers under consideration: they instantiate free variables by linear terms, i.e. terms where any λ-abstractions bind one and only one occurrence of a bound variable. Linear second-order unification proper...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005